import { useLoaderData } from 'react-router';

// eslint-disable-next-line react-refresh/only-export-components
export function loader() {
  return { message: 'Hello from the root loader!' };
}

export default function Root() {
  const data = useLoaderData();
  return (
    <div>
      <h2>{data.message}</h2>
    </div>
  );
}
